package org.pan.domain.enums;

/**
 * 此枚举定义不同的卡片状态
 *
 * Created by panmingzhi on 2015/12/25.
 */
public enum CardStatusEnum {
	// 未分配
	UnAssigned,
	// 已分配
	Assigned,
	// 临时分配
	TempAssigned,
	//己授权
	Authorized,
	// 已挂失
	ReportedMissing,
	// 已注销
	Deleted,
	//停车场卡片
	CarparkAssigned;
	//临时分配：先分发一批卡片，这批卡片属于一个临时的用户，未指定到具体的用户
	
	public static final String UNASSIGNED = "库存";
	public static final String ASSIGNED = "分配";
	public static final String TEMPASSIGNED = "临时分配";
	public static final String REPORTEDMISSING = "挂失";
	public static final String DELETED = "注销";
	public static final String AUTHORIZED = "己授权";
	public static final String CARPARKASSIGNED = "停车场卡片";

	@Override
	public String toString() {
		switch (this) {
			case UnAssigned:
				return CardStatusEnum.UNASSIGNED;
			case Assigned:
				return CardStatusEnum.ASSIGNED;
			case Authorized:
				return CardStatusEnum.AUTHORIZED;
			case ReportedMissing:
				return CardStatusEnum.REPORTEDMISSING;
			case TempAssigned:
				return CardStatusEnum.TEMPASSIGNED;
			case Deleted:
				return CardStatusEnum.DELETED;
			case CarparkAssigned:
				return CardStatusEnum.CARPARKASSIGNED;
			default:
				assert false : "Code cannot go here";
				return "";
		}
	}

}
